QuickTime 3 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Working with Progress and Cover Functions

SetMovieDrawingCompleteProc

The SetMovieDrawingCompleteProc function allows you to assign a drawing-complete function to a movie. The Movie Toolbox calls this function based upon guidelines you establish when you assign the function to the movie.

pascal void SetMovieDrawingCompleteProc (Movie theMovie, long flags,
                     MovieDrawingCompleteUPP proc, long refCon);
theMovie
Specifies the movie for this operation. Your application obtains this identifier from such functions as NewMovie , NewMovieFromFile , and NewMovieFromHandle .
flags
Contains information that controls when your drawing complete function is called. The following values are supported:
movieDrawingCallWhenChanged
Specifies that the toolbox should call your drawing-complete function only when the movie has changed.
movieDrawingCallAlways
Specifies that the toolbox should call your drawing-complete function every time your application calls the MoviesTask function.
proc
Contains a pointer to your drawing-complete function. Set this parameter to nil if you want to remove your function.
refCon
Contains a value that the toolbox provides to your drawing-complete function.

Description

Your drawing-complete function must support the following interface:

typedef pascal OSErr (*MovieDrawingCompleteProcPtr)(Movie theMovie, long refCon);
theMovie
Specifies the movie for this operation.
refCon
Contains the reference constant you supplied when your application called the SetMovieDrawingCompleteProc function.

Important
Some media handlers may take less efficient playback paths when a drawing-complete function is used, so it should be used only when absolutely necessary.

RESULT CODES

invalidMovie
-2010 This movie is corrupted or invalid

SetMovieCoverProcs

If a movie with semi-transparent tracks has a movie uncover procedure (set with the SetMovieCoverProcs function), the uncover procedure is now called before each frame to fill or erase the background. Before QuickTime 1.6.1, the Movie Toolbox performed the erase, which limited a cover procedure-aware application's options.

GetMovieCoverProcs

The GetMovieCoverProcs function allows you to retrieve the cover functions that you set with the SetMovieCoverProcs function.

pascal OSErr GetMovieCoverProcs(
                     Movie theMovie,
                     MovieRgnCoverUPP *uncoverProc,
                     MovieRgnCoverUPP *coverProc,
                     long *refcon)
theMovie
Specifies the movie for this operation. Your application obtains this identifier from such functions as NewMovie , NewMovieFromFile , and NewMovieFromHandle .
uncoverProc
Where to return the current uncover procedure. This value is set to nil if no uncover procedure was specified.
coverProc
Where to return the current cover procedure. This value is set to nil if no cover procedure was specified.
refcon
Specifies a reference constant. The toolbox passes this value to your cover functions.

DISCUSSION

The GetMovieCoverProcs function returns the uncover and cover functions for the movie as well as the reference constant for the cover functions.

RESULT CODES

invalidMovie
-2010 This movie is corrupted or invalid

© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |